package com.foreveross.bsl.mam.model.app.domain;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.foreveross.bsl.mongodb.domain.Entity;

/**
 * 
 * 应用实体
 * 
 * @author tanzhixiong
 * @2013-6-20 @上午10:52:41
 */
@Document
public class AppMain extends Entity {

	@Id
	private String id;
	
	/**
	 * 应用所属的类别
	 */
	@Field("categoryid")
	private String categoryid;
	
	@Field("createMessgae")
	private String createMessgae;
	
	@Field("appIds")
	private String[] appIds; // 关联应用

	/**
	 * 是否有效
	 */
	@Field("avilable")
	private int available;

	/**
	 * 应用创建时间
	 */
	@Field("create_time")
	private Date create_time;

	/**
	 * 应用修改时间
	 */
	@Field("modified_time")
	private Date modified_time;

	/**
	 * 应用下载次数
	 */
	@Field("download_counter")
	private int download_counter;

	/**
	 * 应用证书密钥
	 */
	@Field("secret")
	private String secret;

	/**
	 * 应用标识
	 */
	@Field("identifier")
	@Indexed(unique = true)
	private String identifier;

	/**
	 * 应用名称
	 */
	@Field("app_name")
	@Indexed(unique = true)
	private String app_name;

	/**
	 * 应用简介
	 */
	@Field("discription")
	private String discription;

	/**
	 * 应用图片
	 */
	@Field("icon")
	private String icon;
	/**
	 * 构建号
	 */
	private int build;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String[] getAppIds() {
		return appIds;
	}

	public void setAppIds(String[] appIds) {
		this.appIds = appIds;
	}

	public String getCreateMessgae() {
		return createMessgae;
	}

	public void setCreateMessgae(String createMessgae) {
		this.createMessgae = createMessgae;
	}

	public int getAvailable() {
		return available;
	}

	public void setAvailable(int available) {
		this.available = available;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public Date getModified_time() {
		return modified_time;
	}

	public void setModified_time(Date modified_time) {
		this.modified_time = modified_time;
	}

	public int getDownload_counter() {
		return download_counter;
	}

	public void setDownload_counter(int download_counter) {
		this.download_counter = download_counter;
	}

	public String getApp_name() {
		return app_name;
	}

	public void setApp_name(String app_name) {
		this.app_name = app_name;
	}

	public String getCategoryid() {
		return categoryid;
	}

	public void setCategoryid(String categoryid) {
		this.categoryid = categoryid;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	public String getDiscription() {
		return discription;
	}

	public void setDiscription(String discription) {
		this.discription = discription;
	}

	public int getBuild() {
		return build;
	}

	public void setBuild(int build) {
		this.build = build;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

}
